home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1999 / MacHack 1999.toast / The Hacks / CarbonizedMenus / headers / AutoColor.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-06-24  |  723 b   |  29 lines  |  [TEXT/CWIE]

  1. /****************************************************************************************
  2.     AutoColor.h
  3.     
  4.     Copyright © 1999 Red Shed Software. All rights reserved.
  5.     by Jonathan 'Wolf' Rentzsch (jon@redshed.net)
  6.     
  7.     Commenter    Date                Comment
  8.     ---------    -----------------    -----------------------------------------------------
  9.     wolf        Thu, Jun 24, 1999    Created.
  10.     
  11.     ************************************************************************************/
  12.  
  13. #ifndef        _AutoColor_
  14. #define        _AutoColor_
  15.  
  16. class    AutoColor    {
  17.     public:
  18.         AutoColor(
  19.             RGBColor    newColor )
  20.         {    GetForeColor( &oldColor_ );
  21.             RGBForeColor( newColor ); }
  22.         
  23.         ~AutoColor()
  24.         {    RGBForeColor( oldColor_ ); }
  25.     private:
  26.         RGBColor    oldColor_;
  27. };
  28.  
  29. #endif    //    _AutoColor_